package com.example.fragmentos;

import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.graphics.Point;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Display;
import android.view.WindowManager;




public class MainActivity extends FragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        FragmentManager fm = super.getFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        
        WindowManager wm = getWindowManager();
        
        Display d = wm.getDefaultDisplay();
        Point screenSize = new Point();
        d.getSize(screenSize);
        
        /*if(screenSize.x > screenSize.y){
        	
        	Fragmento1 fragmento1 = new Fragmento1();
        	ft.replace(android.R.id.content, fragmento1);        	
        } 
        else{
        	Fragmento2 fragmento2 = new Fragmento2();
        	ft.replace(android.R.id.content, fragmento2);
        }*/
        
        Fragmento3 fragmento3 = new Fragmento3();
    	ft.replace(android.R.id.content, fragmento3);
    	
		//llf3.addView(tv1);
        ft.commit();
    }

    
}
